package org.sgx.gapi.client.apis.urlshortener;

import com.google.gwt.core.client.GWT;

public class UrlResourceBean {
String id, created, longUrl, status;

public String getId() {
	return id;
}

public void setId(String id) {
	this.id = id;
}

public String getCreated() {
	return created;
}

public void setCreated(String created) {
	this.created = created;
}

public String getLongUrl() {
	return longUrl;
}

public void setLongUrl(String longUrl) {
	this.longUrl = longUrl;
}

public String getStatus() {
	return status;
}

public void setStatus(String status) {
	this.status = status;
}

public static <T extends UrlResourceBean> T from(T instance, UrlResource u) {
//	UrlResourceBean url = GWT.create(UrlResourceBean.class); 
	instance.setCreated(u.created()); 
	instance.setId(u.id()); 
	instance.setLongUrl(u.longUrl()); 
	instance.setStatus(u.status()); 
	return instance;
}

}
